﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Snake
{
    public class Tools
    {
        public override bool Equals(object obj)
        {
            return base.Equals(obj);
        }

        public static bool EqualsKey(ConsoleKey key, string val)
        {
            switch (val)
            {
                case "A": return key == ConsoleKey.A;
                case "W": return key == ConsoleKey.W;
                case "S": return key == ConsoleKey.S;
                case "D": return key == ConsoleKey.D;
                case "UP": return key == ConsoleKey.UpArrow;
                case "DOWN": return key == ConsoleKey.DownArrow;
                case "LEFT": return key == ConsoleKey.LeftArrow;
                case "RIGHT": return key == ConsoleKey.RightArrow;
                case "ESC": return key == ConsoleKey.Escape;
                case "ENTER": return key == ConsoleKey.Enter;
                default: return false;
            }
        }
    }
}
